import {baseMixins} from "@/util/baseMixins";
import {initUserInfo} from "@/service/user";
import {
  advisePage,
  deputyToTheNationalPeopleSCongressPage,
  historicalSuggestionPage,
  partyRepresentativePage
} from "@/util/publicConfig";

const detailMixins = {
  mixins: [baseMixins],
  methods: {
    initiateAProposal() {
      let {authType} = this
      // 1人大代表建议,2政协委员建议,3党代表建议
      let subPagePath = ''
      switch (authType) {
        case '1':
        case 1:
          subPagePath = deputyToTheNationalPeopleSCongressPage
          break
        case '2':
        case 2:
          subPagePath = advisePage
          break
        case '3':
        case 3:
          subPagePath = partyRepresentativePage
          break
      }
      this.goSubPage(subPagePath)
    },
    shouHistorySuggestion() {
      this.goSubPage(`${historicalSuggestionPage}?authType=${this.authType}`)
    }
  },
}

export {detailMixins}
